package com.winter.Controller;

import com.winter.service.DictEntryService;
import com.winter.util.Result;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("v1/dictionaries")
public class DictEntryController {

    @Autowired
    private DictEntryService dictEntryService;

    /**
     * 通过类型查询字典列表
     */
    @GetMapping("{type}")
    public Result dictionariesList(@PathVariable("type") String type) {
        return dictEntryService.dictionariesList(type);
    }
}
